
package com.pekall.todo.util;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.pekall.todo.R;

public class AlarmReceiver extends BroadcastReceiver {
    public void onReceive(Context context, Intent intent) {
        NotificationManager notificationManger = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
        Notification notification = new Notification(R.drawable.logo,"welcome",System.currentTimeMillis());
        PendingIntent contentIntent = PendingIntent.getActivity(context, 0, intent, 0);
        notification.setLatestEventInfo(context, "待办事件", "正在运行...", contentIntent);
        notification.flags = Notification.FLAG_ONGOING_EVENT;
        notificationManger.notify(R.drawable.cmcc_name_sorting, notification);
    }
}
